#include <stdio.h>
main()
{
 long n, c, i;
 while (1) scanf("%d",&n);
 for (i=0; i<n; i++)
 {
     scanf("%d",&c);
     if ((c%2)>0)
         printf("%d ",c+2);
     else
         printf("%d ",c);
 }
 printf("\n");
}
